/**
 * Created with CLion.
 * Description: 
 * User: loong
 * Date: 2021-01-28
 * Time: 9:06
 */
#ifndef CODSEEGMENT_CONCURRENTTEST_H
#define CODSEEGMENT_CONCURRENTTEST_H

#include <QtWidgets>
#include <QtConcurrentMap>

struct Student
{
    QString s_name_;
    QString s_id_;
    QString s_age_;
};
typedef QList<Student *> StudentList;

class ConcurrentTest
        : public QObject
{
Q_OBJECT
public:
    ConcurrentTest() = default;

    ~ConcurrentTest() override = default;

public:
    void SetStuList(StudentList _list);
    void Reduce(QString &result, const QStringList &_list);
    const QStringList MapFun(Student * _stu);

private:
    QStringList list_;
    StudentList student_list_;
};


#endif //CODSEEGMENT_CONCURRENTTEST_H
